<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=3,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
	<title>首页</title>
	<link href="css/public/reset-html5.css" rel="stylesheet">
	<link href="css/public/mui.min.css" rel="stylesheet">
	<link href="css/wx-main.css?20161105" rel="stylesheet">
	<link rel="stylesheet" href="css/index.css">
	<link rel="stylesheet" href="swiper/dist/css/swiper.min.css">
	<style>
		.swiper-wrapper > *{
			display:block;
		}
		.swiper-wrapper img{
			width:100%;
		}
	</style>
</head>
<body class="body-bg" id="main">

<div class="main-content">
	<div class="swiper-container">
		<div class="swiper-wrapper">
			<div v-for="b in banners" class="swiper-slide">
				<a href="{{b.gourl?b.gourl:'#'}}">
					<img src="{{b.imgurl}}">
				</a>
			</div>
		</div>
		<!-- Add Pagination -->
		<div class="swiper-pagination"></div>
	</div>
	
	<div class="call-bar white-bg">
		<a href="tel:4000301388">
			<img src="image/电话.png">
			<span class="primary-text">一键下单</span>
		</a>
	</div>
	
	<!--轮播图片 end-->
	<div class="index-section1 mar-hor mar-top">
		<div class="index-button-group">
			<div class="index-btn white-bg" onclick="location.href='select_fault.html?14561'">
				<img src="image/快递.png" class="img1" id="img1">
				<div class="text-color2 text-center text1">上门快修</div>
			</div>
			<div class="index-btn white-bg" onclick="location.href='https://shop18394130.youzan.com/v2/showcase/homepage?alias=ejy1996a&redirect_count=2&sf=wx_sm'">
				<img src="image/商城.png" class="img2"/>
				<div class="text-color2 text-center text1">GO机商城</div>
			</div>
		</div>
		<div class="index-button-group">
			<a class="index-btn white-bg showdow-1" href="recycle_home.html?14561">
				<img src="image/回收.png" class="img1">
				<div class="text-color2 text-center text1">上门回收</div>
			</a>
			<a class="index-btn white-bg showdow-1" href="my_order.html">
				<img src="image/订单.png" class="img2">
				<div class="text-color2 text-center text1">我的订单</div>
			</a>
		</div>
	</div>
	
	<!--客户评价-->
	<p class="group-title primary-text">客户评价</p>
	<div class="mui-table-view white-bg showdow-1 comment-list">
		<div v-for="c in comments" class="comment mui-table-view-cell">
			<img src="{{c.userinfo.img_url}}" alt="">
			<div class="comment_info">
				<div class="user">
					<span v-text="c.userinfo.nickname"></span>
					<span v-text="c.phone"></span>
					<span v-text="c.phone_name"></span>
				</div>
				<div class="content" v-text="c.content"></div>
			</div>
		</div>
	</div>
</div>

<footer class="white-bg showdow-1">
	<ul>
		<li class="text-color3" onclick="location.href='service_process.html'">
			<img src="image/服务流程.png" alt="">
			<span>服务流程</span>
		</li>
		<li class="text-color3" onclick="location.href='FAQ.html'">
			<img src="image/常见问题.png" alt="">
			<span>常见问题</span>
		</li>
		<li class="text-color3" onclick="location.href='pingjiafankui.html'">
			<img src="image/评价反馈.png" alt="">
			<span>评价反馈</span>
		</li>
		<li class="text-color3"  onclick="showQr();">
			<img src="image/客服.png" alt="">
			<span>在线客服</span>
		</li>
	</ul>
</footer>
<style>
	.qr_code{
		top:0;
		left:0;
		right:0;
		bottom:0;
		display: none;
		position:fixed;
		text-align: center;
		font-size:0;
		z-index:10000;
		background:rgba(0, 0, 0, 0.3);
	}
	.qr_code.show{
		display:block;
	}
	.qr_code:after{
		content:"";
		display:inline-block;
		height:100%;
		vertical-align: middle;
	}
	.qr_code img{
		width:70%;
		display: inline-block;
		vertical-align: middle;
	}
</style>
<div onclick="hideQr(this);" class="qr_code" id="qrCode" style="position:fixed;top:0;left:0;bottom:0;right:0;">
	<img src="image/kefuqr.png" alt="">
</div>

</body>
<script src="js/public/jquery-2.2.1.min.js"></script>
<script src="js/public/mui.min.js"></script>
<script src="../plugins/vue/vue.min.js"></script>
<script src="js/phone.js?123"></script>
<script src="swiper/dist/js/swiper.min.js"></script>
<script>
	function showQr(){
		var qr = document.querySelector("#qrCode");
		qr.classList.add("show");
	}
	
	function hideQr(t){
		t.classList.remove("show");
	}
	
	var vue =new Vue({
		el:'#main',
		data:{
			'index_phone_list':'',
			comments:[], //评论
			banners:[]
		},
		methods:{
			'show_index_phone_list':function(data){
				this.index_phone_list = data;
			},
			'go':function(oid,id){
				location.href='select_fault.html?oid='+oid+'&id='+id;
			},
			'go_brand':function(id){
				location.href='select_fault.html?id='+id;
			}
		},
		ready:function(){
			$.post(apiRepair+'index.php?m=Home&c=Index&a=getCommentList',{quality:1},function(res){
				if(res.code==200){
					vue.comments = res.data.list;
				}else if(res.code==0){
					login();
				}
			},'json');
			
			$.get(apiRecycle+'index.php/Home/Index/get_index_banner',{},function(res){
				vue.banners = res.data;
				
				setTimeout(function(){
					var swiper = new Swiper('.swiper-container', {
						pagination: '.swiper-pagination',
						paginationClickable: true
					});
				}, 500);
			},'json');
		}
	});
	
	/*加载评论*/
	$.post(apiRepair+"index.php?m=Home&c=Index&a=getCommentList",{},function(res){
		if(res.code==200){
			vue.show_index_phone_list(res.data);
		}else if(res.code==0){
			login();
		}
	},'json');
</script>
</html>